<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .active1{
            background-color: yellow;
            background-size: 100vh 100vw;
        }
        .active2{
            background-color: green;
            background-size: 100vh 100vw;
        }
    </style>
</head>
<body>
    <div class="box1"></div>
    <button>我是一</button>
    <button>我是二</button>
    <script>
        var btn = document.querySelectorAll("button")
        btn[0].onclick = function(){
            document.body.className = "active1"
        }
        btn[1].onclick = function(){
            document.body.className = "active2"
        }
        
    </script>
</body>
</html>